import 'package:backend.analytics/domain/entities/amplitude_api/amplitude_api_event_type.dart';
import 'package:equatable/equatable.dart';

class AmplitudeApiEvent extends Equatable {
  const AmplitudeApiEvent({
    required this.id,
    required this.time,
    required this.type,
    this.userId,
    this.deviceId,
    this.purchaseItemSku,
    this.revenue,
  }) : assert(userId != null || deviceId != null);

  final String id;
  final DateTime time;
  final AmplitudeApiEventType type;
  final String? userId;
  final String? deviceId;
  final String? purchaseItemSku;
  final double? revenue;

  @override
  List<Object?> get props {
    return [
      id,
      time,
      type,
      userId,
      deviceId,
      purchaseItemSku,
      revenue,
    ];
  }
}